package org.budo.dubbo.protocol.async.repository.zookeeper;

import org.I0Itec.zkclient.IZkDataListener;
import org.I0Itec.zkclient.ZkClient;

/**
 * @author limingwei
 */
public class ZookeeperAsyncRepository {
    public static void main(String[] args) {
        IZkDataListener dataListener = new IZkDataListener() {
            @Override
            public void handleDataDeleted(String dataPath) throws Exception {
            }

            @Override
            public void handleDataChange(String dataPath, Object data) throws Exception {
            }
        };

        ZkClient zkClient = new ZkClient("serverstring");
        String path = null;
        zkClient.subscribeDataChanges(path, dataListener);

        Object data = null;
        zkClient.createEphemeralSequential(path, data);
    }
}